define(function () {

	return {
		disableAll: function(){
			window.wx.ready(function(){

				window.wx.hideAllNonBaseMenuItem();

   		    });
		},
		initWeixinMenu: function(){

			window.wx.ready(function(){

				window.wx.hideAllNonBaseMenuItem();

			    window.wx.showMenuItems({
				      menuList: [
				        'menuItem:share:appMessage', // 分享给好友
				        'menuItem:share:timeline', // 分享到朋友圈
				        'menuItem:favorite'
				      ]
			    });
   		    });
		},
		setShareInfo: function(title, link, imgUrl, desc, successFunc, cancelFunc){

			window.wx.ready(function(){
				
				wx.onMenuShareTimeline({
				    title: title,
				    link: link, // 分享链接
				    imgUrl: imgUrl,
				    success: successFunc,
				    cancel: cancelFunc
				});

			    wx.onMenuShareAppMessage({
				    title: title, 
				    desc: desc,
				    link: link, // 分享链接
				    imgUrl: imgUrl,
				    type: '', // 分享类型,music、video或link，不填默认为link
				    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
				    success: successFunc,
				    cancel: cancelFunc
				});
   		    });
		}
	};

});
